package com.guigui.gulimall.order.vo;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class CartItem {

    private Long skuId;

    /**
     * 商品选中表示
     */
    private boolean check = true;

    private boolean hasStock;

    private String title;

    private String img;

    /**
     * 属性描述
     */
    private List<String> skuAttr;

    private BigDecimal price;

    /**
     * 总数
     */
    private Integer count;

    public BigDecimal getTotalPrice() {

        return price.multiply(new BigDecimal(count));
    }


}
